<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>立体文字动画</title>
    <link href="https://fonts.font.im/css?family=Concert+One" rel="stylesheet">
    <style>
        :root {
            font-size: 32px;
        }

        body {
            display: flex;
            min-height: 100vh;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            background: #ffc000;
            font-family: 'Concert One', cursive;
        }

        h1,
        h2 {
            margin: 0;
            padding: 0;
            position: relative;
            color: #fff;
        }

        img {
            width: 100px;
            margin-top: 60px;
        }

        h1 {
            font-size: 10rem;
            animation: rotate 5s ease-in-out infinite;
        }

        @keyframes rotate {

            0%,
            100% {
                transform: rotate3d(0, 1, 0, -20deg);
            }

            50% {
                transform: rotate3d(0, 1, 0, 20deg);
            }
        }

        h2 {
            font-size: 5rem;
            letter-spacing: -4px;
            animation: h2-rotate 2.5s ease-in-out infinite;
        }

        @keyframes h2-rotate {

            0%,
            100% {
                transform: rotate3d(1, 0, 0, -10deg);
            }

            50% {
                transform: rotate3d(1, 0, 0, 10deg);
            }
        }

        h1::before,
        h1::after {
            content: "3000";
        }

        h2::before,
        h2::after {
            content: "加油！";
        }

        h1::before,
        h1::after,
        h2::before,
        h2::after {
            position: absolute;
            top: 0;
            left: 0;
            z-index: -1;
        }

        h1::before {
            color: #009cde;
            animation: h1-before 5s ease-in-out infinite;
        }

        @keyframes h1-before {

            0%,
            100% {
                transform: translate3d(15px, 5px, -10px);
            }

            50% {
                transform: translate3d(-15px, 5px, -10px);
            }
        }

        h1::after {
            color: #003c71;
            z-index: -2;
            animation: h1-after 5s ease-in-out infinite;
        }

        @keyframes h1-after {

            0%,
            100% {
                transform: translate3d(30px, 10px, -20px);
            }

            50% {
                transform: translate3d(-30px, 10px, -20px);
            }
        }

        h2::before {
            color: #009cde;
            animation: h2-before 2.5s ease-in-out infinite;
        }

        @keyframes h2-before {

            0%,
            100% {
                transform: translate3d(0, 6px, -10px);
            }

            50% {
                transform: translate3d(0, -6px, -10px);
            }
        }

        h2::after {
            color: #003c71;
            z-index: -2;
            animation: h2-after 2.5s ease-in-out infinite;
        }

        @keyframes h2-after {

            0%,
            100% {
                transform: translate3d(0, 12px, -20px);
            }

            50% {
                transform: translate3d(0, -12px, -20px);
            }
        }
    </style>
</head>

<body>
    <h1>3000</h1>
    <h2>加油！</h2>
    <img src="img/img1.jpg" alt="">
</body>

</html>